package com.zzedu.dto;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.PageDTO;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import java.io.Serializable;
import java.util.Date;
import java.util.Map;

/**
 * 资源管理对象 zz_upload_file
 * 
 * @author Mr.Wang
 * @date 2025-01-30
 */
public class ZzUploadFileDTO implements Serializable
{
    private static final long serialVersionUID = 1L;
    /** id */

    private Long id;
    /** 文件原名称 */
    private String oldFileName;
    /** 文件访问地址 */
    private String url;
    /** 文件名称 */
    private String fileName;
    /** 文件扩展名称 */
    private String fileExt;
    /** 来源模块 */
    private String sourceModel;
    /** 关联对象ID */
    private String relationId;
    /** 关联对象 */
    private String relationType;
    /** 添加时间 */

    private Date gmtCreate;
    /** 更新时间 */

    private Date gmtModify;
    /** 逻辑删除(0：未删除 1：id) */
    private Long deleted;
    private Map<String, Object> params;
    /**
     * 当前记录起始索引
     */
    private Long pageNum = 1l;

    /**
     * 每页显示记录数
     */
    private Long pageSize = 20l;

    /**
     * 排序列
     */
    private String orderByColumn;

    /**
     * 排序的方向desc或者asc
     */
    private String isAsc = "asc";

    public void setId(Long id) 
    {
        this.id = id;
    }

    public Long getId() 
    {
        return id;
    }
    public void setOldFileName(String oldFileName) 
    {
        this.oldFileName = oldFileName;
    }

    public String getOldFileName() 
    {
        return oldFileName;
    }
    public void setUrl(String url) 
    {
        this.url = url;
    }

    public String getUrl() 
    {
        return url;
    }
    public void setFileName(String fileName) 
    {
        this.fileName = fileName;
    }

    public String getFileName() 
    {
        return fileName;
    }
    public void setFileExt(String fileExt) 
    {
        this.fileExt = fileExt;
    }

    public String getFileExt() 
    {
        return fileExt;
    }
    public void setSourceModel(String sourceModel) 
    {
        this.sourceModel = sourceModel;
    }

    public String getSourceModel() 
    {
        return sourceModel;
    }
    public void setRelationId(String relationId) 
    {
        this.relationId = relationId;
    }

    public String getRelationId() 
    {
        return relationId;
    }
    public void setRelationType(String relationType) 
    {
        this.relationType = relationType;
    }

    public String getRelationType() 
    {
        return relationType;
    }
    public void setGmtCreate(Date gmtCreate) 
    {
        this.gmtCreate = gmtCreate;
    }

    public Date getGmtCreate() 
    {
        return gmtCreate;
    }
    public void setGmtModify(Date gmtModify) 
    {
        this.gmtModify = gmtModify;
    }

    public Date getGmtModify() 
    {
        return gmtModify;
    }
    public void setDeleted(Long deleted) 
    {
        this.deleted = deleted;
    }

    public Long getDeleted() 
    {
        return deleted;
    }


    public Long getPageNum() {
        return pageNum;
    }

    public void setPageNum(Long pageNum) {
        this.pageNum = pageNum;
    }

    public Long getPageSize() {
        return pageSize;
    }

    public void setPageSize(Long pageSize) {
        this.pageSize = pageSize;
    }

    public String getOrderByColumn() {
        return orderByColumn;
    }

    public void setOrderByColumn(String orderByColumn) {
        this.orderByColumn = orderByColumn;
    }

    public String getIsAsc() {
        return isAsc;
    }

    public void setIsAsc(String isAsc) {
        this.isAsc = isAsc;
    }

    public Map<String, Object> getParams() {
        return params;
    }

    public void setParams(Map<String, Object> params) {
        this.params = params;
    }

    public IPage getPageDTO() {
        return PageDTO.of(getPageNum(), getPageSize());
    }

    @Override
    public String toString() {
        return ToStringBuilder.reflectionToString(this, ToStringStyle.JSON_STYLE);
    }
}
